package com.yf.dao.article;

import com.yf.dao.BaseDao;
import com.yf.entity.TicketEntity;
import com.yf.vo.TicketBackVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 投票Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Aug 22 14:30:08 CST 2018
 */
public interface TicketDao extends BaseDao<TicketEntity> {
    //一天一票模式，判断今天是否投票
    List<TicketEntity> isVote(@Param("campaignId")Long campaignId, @Param("userId")Long userId);

    //一票模式，判断是否投票
    List isVoteByOnlyOne(@Param("campaignId")Long campaignId, @Param("userId")Long userId);


    /**
     * back 投票记录
     * @param params
     * @return
     */
    List<TicketBackVo> findTicketRecord(Map<String, Object> params);

}
